home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / windows / ezdia175.zip / DIALUNIT.PAS < prev    next >
Pascal/Delphi Source File  |  1996-02-21  |  16KB  |  398 lines

  1. unit dialunit;
  2.  
  3. interface
  4. uses wintypes;
  5.  
  6. procedure StartSession(CmdLine:pchar;ParWindow:hwnd);
  7. (*
  8. Used by an application to initiate a standard script-based EZDialup session.
  9. The CMDLINE parameter is identical to the command-line parameter described
  10. in the manule and contians the complete path of an .INI file and a .EZD file.
  11. Optionally can begin with the complete path of the executable itself to
  12. ensure the executable is found.
  13. *)
  14.  
  15. Procedure AbortSession;
  16. (*
  17. Used by an application to have EZDialup immediately hangup and shutdown. 
  18. *)
  19.  
  20. Procedure ChangePhoneNumber;
  21. (*
  22. Used by an application to have EZDialup immediately hangup, shutdown, and
  23. prompt user for a new dialing sequence.  When user supplies new sequence the
  24. call is begun again. 
  25. *)
  26.  
  27. Procedure StopEZDialup(ParWindow:hwnd);
  28. (*
  29. Used by an application to have EZDialup remove itself from memory
  30. immediately.  Obsolete, but present for backward compatibility.
  31. *)
  32.  
  33. (*
  34. The following procedures and functions are used only by applications using
  35. EZDialup to link and remain connected.  The next 11 (SetParentWindow through
  36. SetExecutablePath) procedures must be called before any other commands.
  37. *)
  38.  
  39. procedure SetParentWindow(ParWindow:hwnd);
  40. (*
  41. Lets EZDialup know where to send status messages.  Execute this procedure
  42. as soon as you app begins - doing so means that if your app terminates
  43. during a connection it can restart and automatically re-attach to EZDialup.
  44. *)
  45.  
  46. procedure SetDialingSequence(DialStr:pchar);
  47. (*
  48. Sets the dialing sequence EZDialup will use to dial the server.  This
  49. must include any required prefix digits and/or pauses.                 
  50. *)
  51.  
  52. procedure SetDialupCommPort(PortStr:pchar); 
  53. (*
  54. Set the COMM port to use.  This should look like 'COM1', 'COM2', etc.
  55. *)
  56.  
  57. procedure SetDialupCommConfig(CfgStr:pchar); 
  58. (*
  59. Sets the actual string passed to Windows to initialize the
  60. communications port - "19200,n,8,1" is a typical example.  
  61. *)
  62.  
  63. procedure SetModemInit1(InitStr:pchar); 
  64. (*
  65. Sets the first initialization string sent to the modem, usually "ATZ" or
  66. "AT&F"
  67. *)
  68.  
  69. procedure SetModemInit2(InitStr:pchar); 
  70. (*
  71. Sets the second initialization string sent to the modem.  A typical example
  72. is "AT E0 V1 S0=0 X4"...
  73.  
  74. AT simply starts the command.
  75.  
  76. E0 asks the modem not to repeat every command back to the computer.
  77.  
  78. V1 asks modem to report situations with phrases (e.g. "CONNECT 14400").
  79.  
  80. X4 asks modem to report statuses with all available detail.
  81.  
  82. These are the minimal settings.  Additional data-compression codes may be
  83. added if desired.
  84. *)
  85.  
  86.  
  87. Procedure SetDownloadBlockSize(Size:integer);      
  88. (*
  89. Used to set the size of data blocks during downloads.  Maximum value
  90. is 4096. 
  91. *)
  92.  
  93. Procedure SetUploadBlockSize(Size:integer);
  94. (*
  95. Used to set the size of data blocks during upoads.  Maximium value
  96. is 4096. 
  97. *)
  98.  
  99. procedure SetLinkUserPath(path:pchar);
  100. (*
  101. Used to set the path on the server that contains the password file (COMMPASS)
  102. for the given user.
  103. *)
  104.  
  105. procedure SetLinkUserPassword(password:pchar);
  106. (*
  107. Used to set the password EZDialup will use to log in to the server.
  108. *)
  109.  
  110. procedure SetExecutablePath(path:pchar); 
  111. (*
  112. Used to set the complete path of the executable usually named EZDIALUP.EXE,
  113. though you may give the file any other name with an .EXE extension and
  114. specify the new name with this function
  115. *)
  116.  
  117. procedure EstablishDialupLink;
  118. (*
  119. Used by an application to dial a server immediately.  Not needed, because
  120. all the following commands will establish the link automatically if one does
  121. not already exist.
  122. *)
  123.  
  124. (*
  125. The following functions have a few things in common:
  126.  
  127. 1) Will establish link automatically if one does not already exist.
  128. 2) Returns the command's serial number.  Your app should store this.
  129. 3) Your application will receive a message at WMUSER+151 when the command
  130. is finished.  The 16-bit wparam portion of the message will contain the
  131. serial number of command completed, and the 32-bit lparam portion of
  132. the message is a pointer to a null-terminated string that describes
  133. the completion status.  If the string reads "No Errors" then, of course, no
  134. problem occurred during command execution.  Otherwise, the string describes
  135. the problem.
  136. *)
  137.  
  138. function StartDownload(ServerSource,ClientTarget:pchar):word;
  139. (*
  140. Used to have EZDialup start transferring a file from the server to the
  141. client.  Returns the command's serial number.
  142. *)
  143.  
  144. function StartUpload(ClientSource,ServerTarget:pchar):word;
  145. (*
  146. Used to have EZDialup start transferring a file from the client to the
  147. server.  Returns the command's serial number.
  148. *)
  149.  
  150. function StartMoveDown(ServerSource,ClientTarget:pchar):word;
  151. (*
  152. Used to have EZDialup start transferring a file from the server to the
  153. client.  This move is stopped if client finds a file already exists with
  154. the name in the ClientTarget parameter, or if the server can not find a
  155. file with the name in the ServerSource parameter.  If the transfer to the
  156. client is successful, the file on the server is removed.  Returns the
  157. command's serial number.
  158. *)
  159.  
  160. function StartMoveUp(ClientSource,ServerTarget:pchar):word;
  161. (*
  162. Used to have EZDialup start transferring a file from the client to the
  163. server.  This move is stopped if server finds a file already exists with
  164. the name in the ServerTarget parameter, or if the client can not find a
  165. file with the name in the ClientSource parameter.  If the transfer to the
  166. server is successful, the file on the client is removed.  Returns the
  167. command's serial number.
  168. *)
  169.  
  170. function UnzipServerFile(ZipFilePath,TargetServerDirectory:pchar):word;
  171. (*
  172. Used to Un-zip the files stored in the server file listed in the ZipFilePath
  173. parameter into the directory specified in the TargetServerDirectory
  174. parameter.  Files are overwritten if already there.  Returns the command's
  175. serial number.  If the Target directory does not exist it will be created
  176. before the unzip.  All zip functions are 2.04g-compatible.
  177. *)
  178.  
  179. function UnzipClientFile(ZipFilePath,TargetClientDirectory:pchar):word;
  180. (*
  181. Used to Un-zip the files stored in the client file listed in the ZipFilePath
  182. parameter into the directory specified in the TargetClientDirectory
  183. parameter.  Files are overwritten if already there.  Returns the command's
  184. serial number.  If the Target directory does not exist it will be created
  185. before the unzip.  All zip functions are 2.04g-compatible.
  186. *)
  187.  
  188. function ZipServerFile(TargetZipFile,SourcePathAndFileMask:pchar):word;
  189. (*
  190. Used to add to a server .ZIP file (listed in the TargetZipFile parameter)
  191. the files that match the path/wildcard in SourcePathAndFileMask parameter.
  192. The file is not overwritten if already there - use the DeleteFilesOnServer
  193. command to start a new one.  If the file is already in the .ZIP file, and
  194. the date/time stamp is the same, the file is not added again; but if the
  195. file is newer it will replace the older version.  Returns the command's
  196. serial number.  All zip functions are 2.04g-compatible.
  197. *)
  198.  
  199. function ZipClientFile(TargetZipFile,SourcePathAndFileMask:pchar):word;
  200. (*
  201. Used to add to a client .ZIP file (listed in the TargetZipFile parameter)
  202. the files that match the path/wildcard in SourcePathAndFileMask parameter.
  203. The file is not overwritten if already there - use the DeleteFilesOnClient
  204. command to start a new one.  If the file is already in the .ZIP file, and
  205. the date/time stamp is the same, the file is not added again; but if the
  206. file is newer it will replace the older version.  Returns the command's
  207. serial number.  All zip functions are 2.04g-compatible.
  208. *)
  209.  
  210. function DeleteFilesOnServer(SourcePathAndFileMask:pchar):word;
  211. (* 
  212. Used to delete the files on the server that match the path/wildcard, and
  213. can erase a single file or, using the asterisk wild-card symbol, a group
  214. of files.  Returns the command's serial number.
  215. *)
  216.  
  217. function DeleteFilesOnClient(SourcePathAndFileMask:pchar):word;
  218. (*
  219. Used to delete the files on the client that match the path/wildcard, and
  220. can erase a single file or, using the asterisk wild-card symbol, a group
  221. of files.  Returns the command's serial number.
  222. *)